import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 回收图片信息 */
export interface ProImage {
          queId: number; // 问题选项ID
          imageUrl?: string; // 图片URL
          proOrder?: number; // 排序
          storeId: number; // 店面ID
  }

// 回收图片 API
export const ProImageApi = {
  // 查询回收图片分页
  getProImagePage: async (params: any) => {
    return await request.get({ url: `/rec/pro-image/page`, params })
  },

  // 查询回收图片详情
  getProImage: async (id: number) => {
    return await request.get({ url: `/rec/pro-image/get?id=` + id })
  },

  // 新增回收图片
  createProImage: async (data: ProImage) => {
    return await request.post({ url: `/rec/pro-image/create`, data })
  },

  // 修改回收图片
  updateProImage: async (data: ProImage) => {
    return await request.put({ url: `/rec/pro-image/update`, data })
  },

  // 删除回收图片
  deleteProImage: async (id: number) => {
    return await request.delete({ url: `/rec/pro-image/delete?id=` + id })
  },

  /** 批量删除回收图片 */
  deleteProImageList: async (ids: number[]) => {
    return await request.delete({ url: `/rec/pro-image/delete-list?ids=${ids.join(',')}` })
  },

  // 导出回收图片 Excel
  exportProImage: async (params) => {
    return await request.download({ url: `/rec/pro-image/export-excel`, params })
  },
}